home *** CD-ROM | disk | FTP | other *** search
Wrap
GW-BASIC | 1983-08-18 | 8.8 KB | 130 lines
1 REM INTRODUCTION TO EPISTAT 2 REM Written by Tracy L. Gustafson, M.D. 3 REM Round Rock, Texas. Version 2.0, 1982 5 DEF SEG=&H40 7 A=PEEK(&H17): IF NOT(A AND &H20) THEN POKE &H17,(A AND (NOT &H20)) OR &H20 10 DEF SEG: KEY OFF: WIDTH 80: SCREEN 0,0: COLOR 0,7,0: CLS 11 PRINT TAB(14);"THENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENUSER-SUPPORTED SOFTWARETHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHEN" 15 PRINT: PRINT: PRINT TAB(8);STRING$(61,178) 20 PRINT TAB(8);"WENDWEND WENDWEND" 21 PRINT TAB(8);"WENDWEND EPISTAT is a statistical package distributed WENDWEND" 22 PRINT TAB(8);"WENDWEND free of charge to persons providing a blank diskette. WENDWEND" 23 PRINT TAB(8);"WENDWEND If you have used the program and found it useful, WENDWEND" 24 PRINT TAB(8);"WENDWEND your contribution ($25 suggested) will be appreciated. WENDWEND" 25 PRINT TAB(8);"WENDWEND WENDWEND" 26 PRINT TAB(8);"WENDWEND Send contributions to: WENDWEND" 27 PRINT TAB(8);"WENDWEND Tracy L. Gustafson, M.D. WENDWEND" 28 PRINT TAB(8);"WENDWEND 1705 Gattis School Road WENDWEND" 29 PRINT TAB(8);"WENDWEND Round Rock, Texas 78664 WENDWEND" 30 PRINT TAB(8);"WENDWEND WENDWEND" 31 PRINT TAB(8);"WENDWEND All users may copy and distribute these programs WENDWEND" 32 PRINT TAB(8);"WENDWEND provided: WENDWEND" 33 PRINT TAB(8);"WENDWEND 1.) The programs are not altered in any way. WENDWEND" 34 PRINT TAB(8);"WENDWEND 2.) No fee is charged for copying or distribution. WENDWEND" 35 PRINT TAB(8);"WENDWEND WENDWEND" 40 PRINT TAB(8);STRING$(61,178): FOR Z=1 TO 4: PLAY "MB O=Z; L18 CEGB-": NEXT 45 FOR Z=4 TO 2 STEP -1: PLAY "MB O=Z; L14 AFC.": NEXT: PLAY "MB O1 L16 B L6 B-A L2 F" 48 FOR Z=1 TO 10000: NEXT: COLOR 7,0,1 50 CLS: PRINT TAB(21);"KEY";STRING$(29,205);"CLOSE" 55 PRINT TAB(21);"OPEN EPISTAT STATISTICAL PACKAGE OPEN" 60 PRINT TAB(21);"SCREEN";STRING$(29,205);"LOAD" 75 PRINT: PRINT: PRINT TAB(5);"Would you like to:": PRINT 80 PRINT TAB(15);"1.) List the tests and functions available.": PRINT 85 PRINT TAB(15);"2.) Determine the best test for your problem.": PRINT 90 PRINT TAB(15);"3.) Exit to run a specific test program.": PRINT: PRINT 95 PRINT TAB(20);: INPUT "Enter your choice: ",ASUB 100 IF ABS(2-ASUB)>1.01 THEN BEEP: GOTO 95 105 ON ASUB GOTO 110,225,520 110 CLS: PRINT TAB(25);"TESTS AVAILABLE IN EPISTAT" 112 PRINT TAB(25);STRING$(26,205): PRINT 115 PRINT TAB(29);"PROGRAM";TAB(69);"PROGRAM" 120 PRINT "TEST OR FUNCTION";TAB(30);"NAME";TAB(42);"TEST OR FUNCTION";TAB(70);"NAME" 122 PRINT "SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND";TAB(29);"SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND";TAB(42);"SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND";TAB(69);"SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND" 125 PRINT "Analysis of variance........ANOVA*";TAB(42);"Mean and Median............DATA-ONE*" 130 PRINT "Bayes' theorem..............BAYES";TAB(42);"Normal distribution........NORMAL*" 135 PRINT "Binomial distribution.......BINOMIAL";TAB(42);"Poisson distribution.......POISSON" 140 PRINT "Chi-square test.............CHISQR";TAB(42);"Random sample generator....RANDOMIZ" 145 PRINT "Correlation coefficient.....CORRELAT*";TAB(42);"Rank correlation...........RANKTEST*" 150 PRINT "F Distribution..............ANOVA*";TAB(42);"Rank sum test..............RANKTEST*" 155 PRINT "Fisher's exact test.........FISHERS";TAB(42);"Rates adjusted.............RATEADJ*" 160 PRINT "Graph histogram.............HISTOGRM*";TAB(42);"Sample size determination..SAMPLSIZ" 165 PRINT "Linear regression...........LNREGRES*";TAB(42);"Signed rank test...........RANKTEST*" 170 PRINT "Mantel-Haenszel Chi-square..MHCHISQR";TAB(42);"Standard deviation.........DATA-ONE*" 175 PRINT "Mantel-Haenszel for";TAB(42);"Student's T-test...........T-TEST*" 180 PRINT TAB(3);"multiple controls/case....MHCHIMLT*";TAB(42);"T distribution.............T-TEST*" 185 PRINT "McNemar's test..............MCNEMAR";TAB(42);"Transfer data" 190 PRINT TAB(44);"between two datafiles....FILETRAN*" 200 PRINT: PRINT TAB(5);"*Starred programs can evaluate data entered and saved using DATA-ONE." 210 PRINT: PRINT TAB(20);"Press any key to return to main menu:"; 220 A$=INKEY$: IF A$="" THEN 220 ELSE 50 225 CLS: PRINT TAB(18);"DETERMINING THE BEST STATISTICAL TEST" 227 PRINT TAB(18);STRING$(37,205): PRINT: PRINT 230 PRINT TAB(5);"Do you want to consider:": PRINT 235 PRINT TAB(20);"1.) Tests for a single sample.": PRINT 240 PRINT TAB(20);"2.) Tests for 2 or more samples.": PRINT 245 PRINT TAB(20);"3.) Other statistical functions.": PRINT 250 PRINT TAB(20);"4.) Return to main menu.": PRINT: PRINT 255 PRINT TAB(25);: INPUT "Enter your choice: ",ASUB 260 IF ABS(ASUB-2.5)>1.51 THEN BEEP: GOTO 255 265 ON ASUB GOTO 270,315,480,50 270 CLS: PRINT TAB(25);"TESTS FOR A SINGLE SAMPLE": PRINT 275 PRINT "The following tests compare an observed number": PRINT TAB(37);"to the expected (population) rate:": PRINT: PRINT 280 PRINT "[BINOMIAL] : The Binomial distribution applies when a dichotomous variable": PRINT TAB(14);"has an equal probability of occurring on each of N trials.": PRINT 285 PRINT "[POISSON] : The Poisson distribution applies when a dichotomous variable": PRINT TAB(14);"has a known probability of occurring on each trial,": PRINT TAB(14);"but the number of trials is not known.": PRINT 290 PRINT "[NORMAL] : The Normal distribution applies to continuous and dichotomous": PRINT TAB(14);"variables when the sample size is >30 and normally distributed." 295 PRINT TAB(14);"Specifically used when comparing a sample mean": PRINT TAB(14);"with a population mean.": PRINT 305 PRINT: PRINT TAB(20);"Press any key to return to menu:" 310 A$=INKEY$: IF A$="" THEN 310 ELSE 225 315 CLS: PRINT TAB(23);"TESTS FOR TWO OR MORE SAMPLES": PRINT: PRINT 320 INPUT "Is the variable under consideration probably normally distributed? (Y or N) ",A$ 325 IF A$="Y" OR A$="y" THEN 355 ELSE IF A$="N" OR A$="n" THEN 330 ELSE BEEP: GOTO 320 330 PRINT: PRINT: PRINT "[RANKTEST] includes three tests:": PRINT: PRINT TAB(10);"1.) The Signed Rank Test compares the medians of paired samples.": PRINT 335 PRINT TAB(10);"2.) Spearman's Rank Correlation evaluates the correlation": PRINT TAB(14);"between paired variables.": PRINT 340 PRINT TAB(10);"3.) The Rank Sum Test compares the medians of independent samples." 345 PRINT: PRINT: PRINT TAB(20);"Press any key to return to menu:" 350 A$=INKEY$: IF A$="" THEN 350 ELSE 225 355 PRINT: PRINT TAB(24);"NORMALLY DISTRIBUTED SAMPLES": PRINT: PRINT TAB(12); 360 INPUT"Are these samples paired (P) or independent (I)? ",A$ 365 IF A$="P" OR A$="p" THEN 370 ELSE IF A$="i" OR A$="I" THEN 410 ELSE BEEP: GOTO 360 370 PRINT: PRINT: PRINT: PRINT "[T-TEST] : The paired T-Test compares means of continuous variables.": PRINT 375 PRINT "[LNREGRES]: Linear Regression analysis evaluates linear association.": PRINT 380 PRINT "[CORRELAT]: Pearson's correlation coefficient evaluates correlation.": PRINT 385 PRINT "[MCNEMAR] : McNemar's test compares paired dichotomous variables.": PRINT 390 PRINT "[MHCHIMLT]: Mantel-Haenszel Chi-square for multiple controls compares": PRINT TAB(14);"dichotomous variables with several controls per case.":PRINT 400 PRINT:PRINT:PRINT: PRINT TAB(20);"Press any key to return to menu:": PRINT 405 A$=INKEY$: IF A$="" THEN 405 ELSE 225 410 CLS: PRINT TAB(20);"NORMALLY DISTRIBUTED INDEPENDENT SAMPLES": PRINT 415 PRINT TAB(8);: INPUT "Do you want to analyze TWO (T) or MORE THAN TWO (M) samples? ",A$ 420 IF A$="t" OR A$="T" THEN 450 ELSE IF A$="M" OR A$="m" THEN 425 ELSE BEEP: GOTO 415 425 PRINT: PRINT: PRINT: PRINT "[ANOVA] : ONE-WAY Analysis of Variance compares the means of": PRINT TAB(14);"3 or more samples." 430 PRINT TAB(14);"TWO-WAY Analysis of Variance evaluates the combined effects":PRINT TAB(14);"of 2 variables on a third variable.": PRINT 440 PRINT: PRINT: PRINT TAB(20);"Press any key to return to menu:" 445 A$=INKEY$: IF A$="" THEN 445 ELSE 225 450 PRINT: PRINT: PRINT: PRINT "[T-TEST] : The unpaired T-Test compares the means of continuous variables.": PRINT 455 PRINT "[FISHERS] : Fisher's Exact Test compares dichotomous variables.": PRINT 460 PRINT "[CHISQR] : Chi-square Test compares discrete variables when": PRINT TAB(14);"the expected value for each cell is > 5.": PRINT 465 PRINT "[MHCHISQR] : Mantel-Haenszel Chi-square Test compares a dichotomous": PRINT TAB(14);"variable while controlling for another factor.": PRINT 470 PRINT: PRINT: PRINT TAB(20);"Press any key to return to menu:" 475 A$=INKEY$: IF A$="" THEN 475 ELSE 225 480 CLS: PRINT TAB(23);"OTHER STATISTICAL FUNCTIONS": PRINT: PRINT 485 PRINT "[BAYES] : Bayes theorem evaluates the predictive power of a": PRINT TAB(14);"diagnostic test or variable.": PRINT 488 PRINT "[HISTOGRM] : Graphs a histogram of sample data either on screen": PRINT TAB(14);"or on printer.": PRINT 490 PRINT "[NORMAL] : The Normal distribution calculates the percent of": PRINT TAB(14);"test values expected to fall within a given range.": PRINT 495 PRINT "[RATEADJ] : Direct and indirect rate adjustments are performed to": PRINT TAB(14);"make a sample comparable to a standard.": PRINT 500 PRINT "[SAMPLSIZ] : Calculates the appropriate sample sizes for surveys,": PRINT TAB(14);"paired and unpaired studies.": PRINT 505 PRINT "[RANDOMIZ] : Selects a random sample for survey or study.": PRINT 510 PRINT: PRINT TAB(17);"Press any key to return to main menu:" 515 A$=INKEY$: IF A$="" THEN 515 ELSE 50 520 CLS: PRINT TAB(20);"RUNNING EPISTAT STATISTICAL PROGRAMS" 522 PRINT TAB(20);STRING$(36,205): PRINT: PRINT 525 PRINT TAB(3);"Determine the program name (PROGNAME) from Section 1 or 2, then enter: " 530 PRINT: PRINT TAB(30);"RUN ";CHR$(34);"PROGNAME";CHR$(34): PRINT: PRINT 535 PRINT "For 10 common programs, use the FUNCTION KEYS defined below:": PRINT 540 KEY 1,"RUN "+CHR$(34)+"DATA-ONE"+CHR$(34): KEY 2,"RUN "+CHR$(34)+"ANOVA"+CHR$(34) 545 KEY 3,"RUN "+CHR$(34)+"BINOMIAL"+CHR$(34): KEY 4,"RUN "+CHR$(34)+"CHISQR"+CHR$(34) 550 KEY 5,"RUN "+CHR$(34)+"FISHERS"+CHR$(34): KEY 6,"RUN "+CHR$(34)+"LNREGRES"+CHR$(34) 555 KEY 7,"RUN "+CHR$(34)+"NORMAL"+CHR$(34): KEY 8,"RUN "+CHR$(34)+"POISSON"+CHR$(34) 560 KEY 9,"RUN "+CHR$(34)+"RANKTEST"+CHR$(34): KEY 10,"RUN "+CHR$(34)+"T-TEST"+CHR$(34) 570 KEY LIST: PRINT TAB(22);: COLOR 0,7: PRINT " GOOD LUCK WITH EPISTAT ": COLOR 7,0 575 END